package cate.game.fight.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBFight;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "玩家设置观战 の 请求")
public class WatchingSetReq implements MsgInput {
    @NoteField(value = "功能代码")
    public int func;

    @NoteField(value = "是否观看", detail = "true:观看,false:不看")
    public boolean watching;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getFight().action.setWatching(func, watching);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBFight.SET_WATCHING_REQ;
    }
}
